<?php
namespace yan\editor_frontend\editor;
use yii\helpers\Html;
class WebEditorWidget extends \yii\base\Widget{
	public $value;
	public $child;
	public $that;
    public $parent_type;

	public function run(){
		if(empty($this->value['value'])) return null;

		$shtml = Html::beginTag('div', [
			'class'=>'WebEditorWidget '.$this->value['value']['class'],
			'style'=>$this->value['value']['style'],
			'id'=>$this->value['value']['class_id'],
		]);
		$shtml .= \common\utils\Helper::showContent($this->value['value']['content']);
		$shtml .= Html::endTag('div');
		return $shtml;
	}
}